package com.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName:
 * @Author: 仄言in
 * @Desctiption: (描述)
 * @Date: 2021/4/13 15:20
 * @Version 1.0 (版本)
 */
@Configuration
public class RuleConfig {
    /**
     * 更改负载均衡策略，还是使用他们的,
     * 随机访问
     */
    @Bean
    public IRule getIRule(){
        return new RandomRule();
    }
}
